package vns.server.domain;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.datastore.Key;

import vns.shared.ObjectTypeBooleanDTO;


@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true")

public class ObjectTypeBoolean {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key id;
	
	@Persistent
	private boolean value;
	
	public ObjectTypeBoolean(ObjectTypeBooleanDTO objectTypeBooleanDTO){
		this.value=objectTypeBooleanDTO.getValue();
	}
	
	public void updatefromDTO(ObjectTypeBooleanDTO objectTypeBooleanDTO){
		this.value=objectTypeBooleanDTO.getValue();
	}
	
	public ObjectTypeBooleanDTO toDTO(){
		ObjectTypeBooleanDTO otBoolean=new ObjectTypeBooleanDTO(this.id,this.value);
		return otBoolean;
	}
	
	public Key getId(){
		return id;
	}
	
	public boolean getValue(){
		return value;
	}
	
	public void setValue(boolean Value){
		this.value=Value;
	}
	
}
